package order;

import common.db.*;
import common.main.*;

public class ChangeBean extends MainBean
{
	public void funcExecute() throws Exception
	{
		String code = (String)inputTable.get("code");
		String user_id = (String)inputTable.get("user_id");
		String client = (String)inputTable.get("client");
		String wbfrom = (String)inputTable.get("wbfrom");

		System.out.println("code : "+code);

		if(wbfrom.equals("W"))
		{
			queryBuffer = new StringBuffer("");
			queryBuffer.append("UPDATE ORDERLIST SET ORDER_STATE=1, UPD_ID='" + user_id + "', UPD_DATE=SYSDATE, UPD_IP='" + client + "' WHERE CODE='"+code+"'");
	
			DBExecute dbe = new DBExecute(queryBuffer.toString());
			outputList = dbe.getDataList();		
		}
		else if(wbfrom.equals("B"))
		{
			queryBuffer = new StringBuffer("");
			queryBuffer.append("UPDATE ORDERLIST SET ORDER_STATE=7, UPD_ID='" + user_id + "', UPD_DATE=SYSDATE, UPD_IP='" + client + "' WHERE CODE='"+code+"'");
	
			DBExecute dbe = new DBExecute(queryBuffer.toString());
			outputList = dbe.getDataList();			
		}
	}
}